package com.fyl.verify.anno;


import java.lang.annotation.Repeatable;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

@Target(FIELD)
@Retention(RUNTIME)
@Repeatable(ParamVerifyRule.List.class)
public @interface ParamVerifyRule {

    String message() default "Verification failed";

    boolean required() default true;

    String patten() default "";

    String[] dycMethods() default {};//example: com.xxx.className.MethodName ; params: (field) || (field, object)

    @Target({FIELD})
    @Retention(RUNTIME)
    @interface List {
        ParamVerifyRule[] value();
    }
}
